package cn.xej.demo.executor;

/**
 * @Author alicat.xu
 * @Date 2021/10/28 4:43 下午
 */
public class TeamContext {

    private static final ThreadLocal<TeamContext> LOCAL = ThreadLocal.withInitial(TeamContext::new);

    private String teamUid;
    private String ak;

    public void setTeamUid(String teamUid) {
        this.teamUid = teamUid;
    }

    public static TeamContext getContext() {
        return LOCAL.get();
    }

    public String getTeam() {
        return this.teamUid;
    }

    public static void removeContext() {
        LOCAL.remove();
    }

    public String getKey() {
        return ak;
    }

    public void setAk(String ak) {
        this.ak = ak;
    }

}
